import java.util.Scanner;

public class Demo1_10 {
    //输出一个整数的每一位，如：123的每一位是3，2，1
    public static void countNum() {
        int ret = 0;
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int number = scan.nextInt();
        while (number != 0) {
            ret = number % 10;
            number = number / 10;
            System.out.print(ret + " ");
        }
    }

    public static void main(String[] args) {
        countNum();
    }
}